-
Notifications
You must be signed in to change notification settings - Fork 413
chore(go): update samples and test cases #3512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -613,6 +613,11 @@ func translateCandidate(cand *genai.Candidate) *ai.ModelResponse { | |||
m.FinishReason = ai.FinishReasonUnknown | |||
} | |||
msg := &ai.Message{} | |||
if cand.Content == nil { | |||
m.Message = msg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apascal07 when testing MCP, there were some spurious responses that returned no errors but no candidates on them. When falling in this corner case, should we panic or silently return an empty response message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which responses are you referring to? It's intermittent or it fails for certain requests consistently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the responses from the plugin sometimes come with no candidates when running the mcp-client
sample using the client
example. I'd say 2 out of 5 times the issue is reproducible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then create an error and return it saying no valid candidates were produced. That's pretty weird though that there is neither a response nor an error. Please sort this out with @huangjeff5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the cause of the intermittent issue was this: 8094cbd
Can you give it another try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @huangjeff5. I encountered an issue at main in the mcp-client sample where the model ref was not getting resolved when calling generate().
The tools are always being listed now, but every time I try to run the generate call using the WithModelName() helper function, the model resolution does not happen successfully.
I'll continue the investigation later today
Checklist (if applicable):